{literal}
<style type="text/css">
	.pres {
		font-family: Times New Roman, serif;
		font-size: 12pt;		
	}
	.pres_header {		
		text-align: center;
		text-transform: uppercase;
		font-size: 20pt;
		font-weight: bold;
		margin: 5px 0 5px 0;		
	}
	.pres_patient_row {
		height: 25px;
		line-height: 25px;
		text-align: left;	
	}
	
	.pres_label {
		float: left;
	}
	
	.pres_value {
		float: left;		
	}
</style>
{/literal}

<div id="maincontainer2" class="pres" style="width: 520px; margin: 0 0 0 10px;" align="center">
	<div class='pageHeader' style="width: 290px; float: left; text-align: center; font-style: italic;">
    	<span>{$hospitalInfo.name}</span>		
    	<span>{$hospitalInfo.address}</span>    	
    	<span>{$hospitalInfo.tel}</span>
	</div>
	
	<div style="text-align: right;float: right; margin-right: 30px;">
		<span style="text-align: center; font-weight: bold;">Số HS: </span>
		<span style="text-align: center; font-weight: bold; font-size: 1.1em;">{$patientObj->get('patient_code')}</span>
	</div>
	<div style="clear: both;"></div>
	
	<div class='pres_header'>
		Đơn thuốc
	</div>
	
	
	<div class="pres_patient_row">
		<div class="pres_label" style="width: 120px;">Họ tên bệnh nhân:</div>
		<div class="pres_value" style="width: 240px; font-weight: bold; text-transform: uppercase;">{$person->getName()}</div>
		
		<div class="pres_label" style="width: 40px;">Tuổi:</div>
		<div class="pres_value" style="width: 20px; font-weight: bold; text-align: center;">{$person->getAge()}</div>
		<div class="pres_value" style="width: 50px; font-weight: bold; text-align: center;">
			{if $person->getGender()=="male" } Nam {elseif $person->getGender()=="female"} Nữ {/if}
		</div>		
	</div>
	<div style="clear: both;"></div>
	<!-- 
	<div class="pres_patient_row">
		<div class="pres_label" style="width: 100px;">Số thẻ BHYT:</div>
		<div class="pres_value" style="width: 230px;">&nbsp;</div>
		<div class="pres_label" style="width: 50px;">ĐT:</div>
        <div class="pres_value" style="width: 100px; text-align: center;">{$person->getPhoneNumber()} &nbsp;</div>
	</div>
	<div style="clear: both;"></div>
	 -->
	<div class="pres_patient_row">
		<div class="pres_label" style="width: 60px;">Địa chỉ:</div>
		<div class="pres_value" style="width: 420px;">{$person->getAddress()}</div>
	</div>
	<div style="clear: both;"></div>
	
	<div class="pres_patient_row">
		<div class="pres_label" style="width: 90px; font-weight: bold; text-decoration: underline;">Chẩn đoán:</div>
		<div class="pres_value" style="width: 390px;">{$prescription.diagnosis|nl2br}&nbsp;</div>													
	</div>
			
	<div style="clear: both;"></div>
	
	<div style="height: 400px; text-align: left; margin-top: 10px;">
		{assign var="i" value=1}
		<table cellspacing='0' cellpadding='0' style="width: 470px;">
		        {foreach from=$presItem item=item}
		        {if !empty($item.medicine_name)}
			        <tr>
			            <td valign='top' width='20px' style='text-align: left; padding-top: 7px; padding-bottom: 0px;'><span style='font-weight: bold; font-size: 1em'>{$i++}) </span></td>
			            <td valign='top' width='300px' style='text-align: left; padding-left: 5px; padding-top: 7px; padding-bottom: 0px; border-bottom: 1px dotted #000;'>
			                <span style='font-weight: bold; font-size: 1em'>
			                  {$item.medicine_name|capitalize_first}
			                </span>
			            </td>
			            <td valign='top' width="180px" style='text-align: right; padding-top: 7px; padding-bottom: 0px; border: none; border-bottom: 1px dotted #000;'>
			                <span style='font-size: 1em; font-weight: bold'>{$item.quantity_num} {$item.quantity_title_text}</span>
			            </td>            
			        </tr>
			        
			        {if $item.usage_title == $usageKneadingConst}
			        <tr>
		                <td>&nbsp;</td>
		                <td colspan="2" style='text-align: left; padding-top: 4px; padding-bottom: 1px; border: none;'>
		                    <span>                
		                    Mỗi ngày thoa lên nướu {$item.usage_num} lần sau khi chải răng                
		                    </span>
		                </td>
		            </tr>	        
		            {elseif $item.usage_title == $usageGargleConst}
		            <tr>
		                <td>&nbsp;</td>
		                <td colspan="2" style='text-align: left; padding-top: 4px; padding-bottom: 1px; border: none;'>
		                    <span>                
		                    Mỗi ngày pha loãng theo hướng dẫn súc miệng {$item.usage_num} lần sau khi chải răng                
		                    </span>
		                </td>
		            </tr>
		            {else}
			            <tr>
			                <td>&nbsp;</td>
			                <td colspan="2" style='text-align: left; padding-top: 4px; padding-bottom: 1px; border: none;'>
			                    <span>                
			                    Mỗi ngày {$item.usage_title_text} {$item.usage_num} lần, mỗi lần {$item.dosage} {$item.dosage_title_text}.
                                {if $item.note != ''}                                                                    
                                    <span style="font-style: italic;">{$item.note|capitalize_first}</span>                                    
                                {/if}
                                                 
			                    </span>
			                </td>
			            </tr>
			        {/if}			        			        
		        
		        {/if}
		        {/foreach}
		</table>
	</div>
	
	<div style="width: 60%; float: left; margin-top: 40px;">
		<div class="pres_label" style="width: 70px; text-decoration: underline; font-weight: bold; text-align: left;">Lời dặn:</div>
		<div class="pres_label" style="width: 325px; text-align: left;">{$prescription.note|nl2br}</div>
		<div style="clear: both;"></div>
		<div class="pres_label" style="width: 70px; text-decoration: underline; font-weight: bold; text-align: left;">Tái khám:</div>	
		<div class="pres_label">{$prescription.re_examine}</div>
	</div>
			
	<div style="width: 40%; text-align: center; float: left;">
		<div style="width: 100%; text-align: center;">Ngày {$prescription.date_formatted}</div>		
        <div style="width: 100%; text-align: center; height: 70px;"><span>Bác sĩ khám bệnh</span></div>
        <div style="width: 100%; text-align: center;"><span style="text-transform: uppercase; font-style: italic;">BS. {$prescription.doctor_name}</span></div>        
	</div>
	
    <!-- 
	<div style="clear: both;"></div>	
	<div class="pres_patient_row" style="margin-top: 5px;">
		<div class="pres_label" style="width: 335px">Họ và tên bố hoặc mẹ bệnh nhân dưới 72 tháng tuổi</div>
		<div class="pres_value" style="width: 170px">&nbsp;</div>
		<div style="clear: both;"></div>					
	</div>
     -->
	<div class="pres_patient_row" style="width: 100%;">
		<div class="pres_label" style="margin-top: 5px;;border-top: 1px solid #000; font-style: italic; width: 100%;">* Khám lại xin mang theo đơn này</div>
	</div>
</div>
